<%@ page language="java" import="java.util.*" pageEncoding="utf8" %>
<%@page import="com.niit.bc.util.web.Constants" %>
<%@page import="com.niit.bc.bean.ListBean" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<script type="text/javascript">
    function checkValue() {
        if (document.sform.OrderID.value == '') {
            alert('请输入订单号!');
            document.sform.OrderID.focus();
            return false;
        }
        else {
            window.location.href = "OrderDetail?orderId=" + document.sform.OrderID.value;
        }
    }
</script>

<div class="shop_left1">
    <div class="shop_left_title">用户信息</div>
    <div class="shop_left1_box" align="center">
        <c:if test="${niit_bc_user == null }">
            请<a href="login.jsp"><font color="orange" size="2">登陆</font></a>或<a href="regist.jsp"><font color="orange" size="2">注册</font></a>
        </c:if>
        <c:if test="${niit_bc_user != null }">
            ${niit_bc_user.userName },欢迎的登录<br />
            您是第${niit_bc_user.userLoginTime }次登录了
        </c:if>
    </div>
</div>
<div class="clear"></div>


<div class="shop_left2">
    <div class="shop_left_title">订单查询</div>
    <div class="shop_left2_box">
        <form name="sform" action="OrderDetail" method="post" ;>
            <div>
                <input type="hidden" value="dosearch" name="action"/>
                <input type="text" name="OrderID" class="textbox" id="OrderID"/>
                <input type="button" value="查询" class="btn" onclick="checkValue();"/>
            </div>
        </form>
    </div>
</div>
<div class="clear"></div>


<div class="clear"></div>
<div class="shop_left1">
    <div class="shop_left_title">图书分类</div>
    <div class="shop_left1_box">


        <table width="100%" border="0" cellspacing="0" cellpadding="3">

            <c:if test="${listType != null}">
                <c:forEach items="${listType}" var="listType">
                    <tr>
                        <td valign="top" width="100%">
                            <!--大类别-->
                            <div class="classtitle" style="font-weight:bold">
                                <img src="images/arrow_r.gif" align="absmiddle">&nbsp;
                                <a href="BookList?typeId=${listType.typeId }" target="_parent">${listType.typeName}</a>
                            </div>
                            <!--小类别-->
                            <div class="list">
                                <c:if test="${listChildType != null }">
                                    <c:forEach items="${listChildType}" var="listChildType">
                                        <c:if test="${listType.typeId == listChildType.typeId }">
                                            <a href="BookList?childTypeId=${listChildType.childTypeId }"
                                               target="_parent">${listChildType.childTypeName }</a>&nbsp;<img src="images/nl.gif" align="absmiddle">&nbsp;
                                        </c:if>
                                    </c:forEach>
                                </c:if>
                            </div>
                        </td>
                    </tr>
                </c:forEach>
            </c:if>

        </table>


    </div>
</div>
<div class="clear"></div>


<!--在次添加左边列表项目开始-->
<div class="shop_left1">
    <div class="shop_left_title">推荐图书</div>
    <div class="shop_left1_box">
        <c:if test="${bookHitsList != null }">
            <c:forEach items="${bookHitsList}" var="bookHitsList">
                <a href="ShowBook?bookId=${bookHitsList.bookId }">
                        ${bookHitsList.bookName }<br/>
                </a>
            </c:forEach>
        </c:if>
    </div>
</div>
<div class="clear"></div>


<div class="shop_left1">
    <div class="shop_left_title">图书销售排行榜</div>
    <div class="shop_left1_box">
        <c:if test="${bookSaleList != null }">
            <c:forEach items="${bookSaleList}" var="bookSaleList">
                <a href="ShowBook?bookId=${bookSaleList.bookId }">
                        ${bookSaleList.bookName }<br/>
                </a>
            </c:forEach>
        </c:if>
    </div>
</div>
<div class="clear"></div>


<div class="shop_left1">
    <div class="shop_left_title">新书推荐</div>
    <div class="shop_left1_box">
        <c:if test="${bookStorageTimeList != null }">
            <c:forEach items="${bookStorageTimeList}" var="bookStorageTimeList">
                <a href="ShowBook?bookId=${bookStorageTimeList.bookId }">
                        ${bookStorageTimeList.bookName }<br/>
                </a>
            </c:forEach>
        </c:if>
    </div>
</div>
<div class="clear"></div>
